//package com.cn.why.springcloudservice_consumer.util;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.util.ResourceUtils;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
//
///**
// * 配置不拦截静态资源
// */
//@Configuration
//public class MyAdapter extends WebMvcConfigurationSupport {
//    /**
//     * 拦截器
//     */
//
//    public void addInterceptors(InterceptorRegistry registry){
//        //addPathPatterns用于添加拦截规则，excludePathpatterns用于排除拦截
//        super.addInterceptors(registry);
//    }
//
//    //注入been
//    @Bean
//    public MyAdapter authMyAdapter(){
//        return new MyAdapter();
//    }
//
//    @Override
//    protected void addResourceHandlers(ResourceHandlerRegistry registry) {
//        registry.addResourceHandler("/**").addResourceLocations(ResourceUtils.CLASSPATH_URL_PREFIX+"/templates/");
//        registry.addResourceHandler("/**").addResourceLocations(ResourceUtils.CLASSPATH_URL_PREFIX+"/static/");
//        super.addResourceHandlers(registry);
//    }
//}
